package javaparser;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javaparser.Java7Parser.ArgumentsContext;
import javaparser.Java7Parser.IdentifierTypeArgumentContext;
import javaparser.Java7Parser.ImportDeclarationContext;
import javaparser.Java7Parser.LocalVariableDeclarationContext;
import javaparser.Java7Parser.NormalClassDeclarationContext;
import javaparser.Java7Parser.PackageDeclarationContext;
import javaparser.Java7Parser.PrimaryContext;
import javaparser.Java7Parser.VariableDeclaratorContext;

import org.antlr.v4.runtime.RuleContext;
import org.antlr.v4.runtime.tree.TerminalNode;

import commandset.ECast;

public class Java7InformationListener extends Java7ParserBaseListener {
	PackageDeclarationContext package_declaration;
	List<ImportDeclarationContext> list_import = new ArrayList<ImportDeclarationContext>();
	NormalClassDeclarationContext normal_class_declaration;
	List<LocalVariableDeclarationContext> local_variable_declaration = new ArrayList<LocalVariableDeclarationContext>();
	List<IdentifierTypeArgumentContext> list_id_type_agrument = new ArrayList<IdentifierTypeArgumentContext>();
	List<PrimaryContext> list_primary = new ArrayList<PrimaryContext>();
	List<ArgumentsContext> list_argrument = new ArrayList<ArgumentsContext>();

	public PackageDeclarationContext getPackage_declaration() {
		return package_declaration;
	}

	public List<ImportDeclarationContext> getList_import() {
		return list_import;
	}

	public NormalClassDeclarationContext getNormal_class_declaration() {
		return normal_class_declaration;
	}

	public List<LocalVariableDeclarationContext> getLocal_variable_declaration() {
		return local_variable_declaration;
	}

	public List<IdentifierTypeArgumentContext> getList_id_type_agrument() {
		return list_id_type_agrument;
	}

	public List<PrimaryContext> getList_primary() {
		return list_primary;
	}

	public List<ArgumentsContext> getList_argrument() {
		return list_argrument;
	}

	@Override
	public void enterNormalClassDeclaration(
			Java7Parser.NormalClassDeclarationContext ctx) {
		normal_class_declaration = ctx;
	}

	@Override
	public void exitNormalClassDeclaration(
			Java7Parser.NormalClassDeclarationContext ctx) {
	}

	@Override
	public void enterPackageDeclaration(
			Java7Parser.PackageDeclarationContext ctx) {
		package_declaration = ctx;
	}

	@Override
	public void exitPackageDeclaration(Java7Parser.PackageDeclarationContext ctx) {
	}

	@Override
	public void enterImportDeclaration(Java7Parser.ImportDeclarationContext ctx) {
		list_import.add(ctx);
	}

	@Override
	public void exitImportDeclaration(Java7Parser.ImportDeclarationContext ctx) {
	}

	@Override
	public void enterLocalVariableDeclaration(
			Java7Parser.LocalVariableDeclarationContext ctx) {
		// list_id_type_agrument.add((IdentifierTypeArgumentContext)
		// ctx.type().classOrInterfaceType().identifierTypeArgument());
		local_variable_declaration.add(ctx);
	}

	@Override
	public void exitLocalVariableDeclaration(
			Java7Parser.LocalVariableDeclarationContext ctx) {
	}

	@Override
	public void enterPrimary(Java7Parser.PrimaryContext ctx) {
		list_primary.add(ctx);
	}

	@Override
	public void exitPrimary(Java7Parser.PrimaryContext ctx) {
	}

	@Override
	public void enterArguments(Java7Parser.ArgumentsContext ctx) {
		list_argrument.add(ctx);
	}

	@Override
	public void exitArguments(Java7Parser.ArgumentsContext ctx) {
	}

}
